package com.yangfan.design_pattern.strategy;

/**
 * @description: 实现计算税率 的实现类
 * @author: yangfan
 * @date: Created in 2020/1/21 0021 20:39
 * @modified By:
 */
public class TAXCalculateImpl implements TAXCalculate {

    private final Double TAX_BONUS = 0.15D;//奖金税率
    private final Double TAX_SALARY = 0.15D;//工资税率

    //实现税率计算接口的方法
    @Override
    public Double calculate(Double salary, Double bonus) {
        return salary * TAX_BONUS + bonus * TAX_SALARY; //实现的逻辑根据自己的实现
    }

}
